home *** CD-ROM | disk | FTP | other *** search
- // This is file QL2HDR.BCP
- //
- // To be renamed FLP2_KERHDR for QDOS
- /*
- KERMIT manifest declarations and globals
-
- Original version : C G Selwyn, University of Bath
-
- This version : D Harper, University of Liverpool
-
- */
- MANIFEST
- $(
- version = 1
- update = 0
-
- soh = 1 // Start of header
- sp = 32 // ASCII space
- cr = 13 // ASCII Carriage return
- lf = 10 // ASCII Line Feed
- bs = 8 // ASCII backspace
- bel = 7 // ASCII bell
- ff = 12 // ASCII formfeed
- del = 127 // ASCII rubout
- USC = 31 // QConnect escape-sequence character
- ctrld = 4
- brkchr = ctrld // Default escape character
- rpack.timeout = -1 // rpack routine timeout character
-
- myquote = '#' // Quote character I will use
- mypad = 0 // Number of padding characters I will need
- mypchar = 0 // Padding character I will need
- myeol = '*N' // End of line character I will need
- mytime = 5 // Seconds after which I should be timed out
- myquote8 = '&' // My 8 bit quoting character
- maxtim = 20 // Maximum Time out interval
- mintim = 2 // Minimum time out interval
- maxfiles = 10 // Maximum no. of files in argument string
- null = 0
- xoff = 'S'-'@'
- xon = 'Q'-'@'
-
- argvl = 50
-
- w.num.commands = 13
- w.s = 1
- w.r = 2
- w.c = 3
- w.e = 4
- w.help = 5
- w.set = 6
- w.show = 7
- w.server = 8
- w.finish = 9
- w.get = 10
- w.take = 11
- w.close = 12
- w.disconn = 13
-
- ws.num.commands = 27
- ws.debug = 1
- ws.delay = 2
- ws.duplex = 3
- ws.8bitpfx = 4
- ws.eol = 5
- ws.escchar = 6
- ws.flowcon = 7
- ws.marker = 8
- ws.packetlength = 9
- ws.padding = 10
- ws.parity = 11
- ws.pause = 12
- ws.prefix = 13
- ws.retry = 14
- ws.timeout = 15
- ws.line = 16
- ws.baud = 17
- ws.bchk = 18
- ws.handshake = 19
- ws.log = 20
- ws.overwrite = 21
- ws.repeatcount = 22
- ws.dir = 23
- ws.termtype = 24
- ws.interface = 25
- ws.padchar = 26
- ws.take.echo = 27
-
- kbd.f1 = 232
- kbd.f2 = 236
- kbd.f3 = 240
- kbd.f4 = 244
- kbd.f5 = 248
- kbd.esc = 27
- kbd.ctrl.esc = 128
- kbd.del = 127
- kbd.left = #XC0
- kbd.ctl.left = #XC2
-
- interface.none = 0 // No little black boxes
- interface.qconnect = 1 // Tandata's little black box
-
-
- p.plen = 0
- p.pad = 1
- p.padchar= 2
- p.eol = 3
- p.sop = 4
- p.quote = 5
- p.timeout= 6
- p.upb = 6
-
- tickspersecond = 50 // 50 Hz clock
- ticksperminute = tickspersecond * 60
- ticksperhour = ticksperminute * 60
- ticksperday = ticksperhour * 24
-
- bitsperbyte = 10
- $)
-
- GLOBAL
- $( size : ug // Size of present data
- // ug+1
- // ug+2
- // ug+3 // Used by prshdr
- // ug+4
- // ug+5
- n : ug+6 // Message number
-
- r.packet.length : ug+7 // Maximum recieve packet size
- r.pad : ug+8 // How much padding to send
- r.padchar : ug+9 // Padding character to be received
- r.eol : ug+10 // End of line character to be received
- r.sop : ug+11 // Start of receive packet character
- r.quote : ug+12 // Receive quote character
- r.timeout : ug+13 // Timeout on receive
-
- s.packet.length : ug+14 // Maximum send packet size
- s.pad : ug+15 // How much padding to send
- s.padchar : ug+16 // Padding character to be sent
- s.eol : ug+17 // End of line character to be sent
- s.sop : ug+18 // Start of packet character to send
- s.quote : ug+19 // Send quote character
- s.timeout : ug+20 // Timeout for my send packet
-
- serving : ug+21 // Server mode
- numtry : ug+22 // Times this packet retried
- oldtry : ug+23 // Times previous packet retried
- fd : ug+24 // Scb pointer for read/write file
- remfd : ug+25 // Console handler number of remote line
- image : ug+26 // True means 8 bit mode
- pakcnt : ug+27 // No. of packets
- debug : ug+28 // Means we're debugging (Unlucky for some)
-
- astate : ug+29 // Present state of the automaton
- escchr : ug+30 // Connect command escape character
- local.fname : ug+31 // Local name of current file
- filnam : ug+32 // Current file name
- recpkt : ug+33 // Receive packet buffer
- packet : ug+34 // Packet buffer
- readchar : ug+35 // Read-a-byte-from-RS233 routine
- qcon.init : ug+36 // Tandata QConnect init flag
- filecnt : ug+37 // Output file count
- disconn : ug+38 // Disconnect routine
- end.connect : ug+39 // Flag to end connect mode
- console : ug+40 // Console stream
- take.echo : ug+41 //
- endtime : ug+42 // Finish time for rpack timeout
- debug.fd : ug+43 // Debug option logging file
- remote : ug+44 // True means we're a remote kermit
- local : ug+45 // User kermit flag
- remote.delay : ug+46 // Delay to sending Send-Init packet if remote
- parse.table : ug+47 // Current parameter table vector used by the parser
- argv : ug+48 // Argument vector
- argvp : ug+49 // Next free slot in argument vector
- numfiles : ug+50 // No. of files to be sent
- command : ug+51 // sic.
- cbuf : ug+52 // Command line buffer
- cptr : ug+53 // Command line buffer pointer
- starttime : ug+54 // Start time of last transfer
- finishtime : ug+55 // Finish time of last transfer
- bytes : ug+56 // No. of bytes transfered
- quote8 : ug+57 // 8-bit quoting character
- quote8ing : ug+58 // Flag 8-bit quoting operational
- word : ug+59 // Current word to send if in image mode
- wptr : ug+60 // Pointer into above
- reporting : ug+61 // Progress reporting flag
- currentin : ug+62 // Current command input stream
- reclevel : ug+63 // Recursion level
- erroring : ug+64 // Error flag
- sendchars : ug+65 // Current routine for sending a buffer
- parse.buf : ug+66 // Storage for parsed command line
- message.pkts : ug+68 // Queue of unprocessed message pkts
- main.com.table : ug+69 // Table of main command word
- set.com.table : ug+70 // Table of SETtable options
- //
- // These are the high-level Kermit protocol routines
- //
- spack : ug+80 // Send-packet routine
- rpack : ug+81 // Receive-packet utility
- recsw : ug+82 // State-switcher for RECEIVE function
- sendsw : ug+83 // State-switcher for SEND function
- rpar : ug+84 // Routine to receive remote host's parameters
- spar : ug+85 // Routine to send our parameters to host
- //
- datstamp : ug+86 // Routine to record the time
- message : ug+87 // Routine to send a message to the console
- nwords : ug+88 // Number of words in the input line
- connect : ug+89 // Terminal-emulation top-level routine
- maxtry : ug+90 // Number of retries
- maxpack : ug+91
- set.function.table : ug+92 // Table of "SET" function addresses
- //
- // Now follow the global names of the various "SET" functions
- //
- not.yet.implemented : ug+93 // For unimplemented functions
- //
- set.debug : ug+94
- set.delay : ug+95
- set.8bitprefixing : ug+96
- set.eol : ug+97
- set.terminal.escape : ug+98
- set.marker : ug+99
- set.packetlength : ug+100
- set.padding : ug+101
- set.parity : ug+102
- set.pause : ug+103
- set.prefix : ug+104
- set.retry : ug+105
- set.timeout : ug+106
- set.line : ug+107
- set.baud : ug+108
- set.duplex : ug+109
- set.interface : ug+110
- set.handshake : ug+111
- set.pad.char : ug+112
- set.take.echo : ug+113
- //
- //
- // These are the globals defining the serial line characteristics
- //
- ser.duplex : ug+120
- ser.parity : ug+121
- ser.baud : ug+122
- ser.handshake : ug+123
- ser.line : ug+124
- ser.escape : ug+125
- ser.pause : ug+126
- ser.interface : ug+127
- ser.name : ug+128
- ser.corrupt : ug+129
- qcon.baud : ug+130
- //
- // More useful global routines
- //
- do.parse : ug+140
- strcomp : ug+141
- open.serial.line : ug+142
- find.new.file : ug+143
- find.old.file : ug+144
- qcon.reset : ug+145
- qcon.initialise : ug+146
- qcon.rdch : ug+147
- raw.rdch : ug+148
- baud : ug+149
- do.set : ug+150
- show.set : ug+151
- ink : ug+152
- report : ug+153
- //
- // and other globals ...
- //
- debug.fd : ug+170
- sys.abort : ug+171 // BCPL abort routine
- kermit.abort : ug+172 // Re-direction of ABORT
- catastrophe : ug+173 // for private disasters !
- debug.report : ug+174 // debugging reports
- $)
-